package com.ks.cms.service;

import com.ks.cms.controller.dto.BCmsNewsInfo;
import com.ks.cms.controller.dto.SearchCriteriaBase;
import com.ks.cms.entity.BCmsNews;
import com.baomidou.mybatisplus.service.IService;
import com.ks.core.base.OperationContext;
import com.ks.core.dto.OperateBase;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 信息发布系统的新闻公告信息表 服务类
 * </p>
 *
 * @author kingdee123
 * @since 2020-12-21
 */
public interface IBCmsNewsService extends IService<BCmsNews> {

    int addBCmsNews(OperationContext context,BCmsNews bCmsNews);

    int deleteBCmsNews(OperationContext context, List<Integer> ids);

    int updateBCmsNews(OperationContext context,BCmsNews bCmsNews);

    BCmsNews selectInfoBCmsNews(OperationContext context,Integer id);

    Map<String, Object> selectBCmsNews(OperationContext context, SearchCriteriaBase searchCriteriaBase);


    Map<String, Object> selectAdminBCmsNews(OperationContext context, SearchCriteriaBase searchCriteriaBase);

    Map<String, Object> selectBCmsNewsList(OperationContext context, SearchCriteriaBase searchCriteriaBase);

    List<BCmsNews> getBCmsNewsList(OperationContext context);

    int changeBCmsNewsState(OperationContext context,Integer id,Integer state);

    /**
     * 添加评论数，点赞数，浏览量，分享数
     * @param id
     * @param type
     * @return
     */
    int addCount(int id,int type);
}
